#include<iostream>
#include<vector>
using namespace std;

int main25()
{
	cout << "25. 基于范围的for循环" << endl;
	vector<int> v{ 1,2,3,4,5 };
	for (auto it = v.begin(); it != v.end(); it++)
	{
		cout << *it << " ";
	}

	cout << endl;

	for (auto& item : v)
	{
		cout << item++ << " ";
	}

	cout << endl;

	for (auto item : v)
	{
		cout << item << " ";
	}

	return 0;
}